home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / File class library / headers / CCustomIcon.h next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.4 KB  |  52 lines  |  [TEXT/KAHL]

  1. /*
  2.  
  3.   CCustomIcon.h
  4.   Superclass:    CIsleResFile
  5.  
  6.     Facilities to implement custom icons in folders and files.
  7.  
  8.   October 8, 1992  isl
  9.   
  10. */
  11.  
  12. #define    _H_CCustomIcon                                //    Include this file only once
  13.  
  14. #include    <CIsleResFile.h>                        //    Superclass definitions
  15. #include    <IconFamilies.h>                        //    Icon suite definitions
  16.  
  17. #define        kFolderIcon        500                        //    Resource ID of the icon for our folders
  18. #define        kInitedOff        0xfeff                //    Make sure the Finder notices the changes
  19. #define        kCustomIcon        1024                    //    Test bit for a custom icon
  20. #define        kIconInfo            "\pCustom icon"
  21.  
  22. /*=====================*/
  23. /*===---------------===*/
  24.  
  25. class CCustomIcon : public CIsleResFile
  26. Begin
  27. private:
  28.         Handle    itsIconSuite;                                //    The icon suite
  29.         
  30. public:
  31.                     void    ICustomIcon                            //    Initialize the object
  32.                             (    void                                            //    No arguments
  33.                             );
  34.  
  35.     virtual    void    FetchIconFamily                    //    Load the icon family from the native resource file
  36.                             (    short                    iconID            //    The resource ID of the icon family
  37.                             );
  38.                             
  39.     virtual    void    PlaceIconFamily                    //    Associate the target file with this icon family
  40.                             (    void                                            //    No arguments
  41.                             );
  42.     virtual    void    ActivateCustomIcon            //    Does the file witha resource fork exist?
  43.                             (    void                                            //    No arguments
  44.                             );
  45.                             
  46.     virtual void Dispose                                    //    Dispose of this object
  47.                             (    void                                            //    No arguments
  48.                             );
  49. End;
  50.  
  51. /*===---------------===*/
  52. /*=====================*/